home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
rjs.lha
/
RJS
/
CmdLine
/
src
/
CmdOpt_double.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-06-14
|
708b
|
40 lines
#include "CmdLine.h"
#include <RJS/Convert.h>
RJS_CmdOpt_double::RJS_CmdOpt_double(const char *k, RJS_CmdOpt::CmdOptFlags f) :
RJS_CmdOpt(k,RJS_CmdOpt::CmdOptFlags(f| Value))
{
val=0;
}
RJS_CmdOpt_double::RJS_CmdOpt_double(const char *k, const RJS_String &dv,
RJS_CmdOpt::CmdOptFlags f) :
RJS_CmdOpt(k,dv,f)
{
val=0;
}
void RJS_CmdOpt_double::reset()
{
RJS_CmdOpt::reset();
val=0;
}
int RJS_CmdOpt_double::set_value()
{
val=RJS_Convert::toDouble(RJS_CmdOpt::val);
if (RJS_Convert::ok()) return 1; else return 0;
}
const char *RJS_CmdOpt_double::value_type()
{
return "double";
}
void RJS_CmdOpt_double::dump()
{
RJS_CmdOpt::dump();
cout << "double: " << value() << endl;
}